﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" x:Class="PhoneGuitarTab.UI.Controls.AutoScroll"
    mc:Ignorable="d"
    Height="175.957" Width="57.725">

    <!-- Animates the a control's height. -->

    <UserControl.Resources>
        <Storyboard x:Name="fadein">
            <DoubleAnimation Storyboard.TargetName="slideControl"
        		Storyboard.TargetProperty="Opacity" From="0.0"
        		To="0.8" Duration="0:0:1"/>
            <DoubleAnimation Storyboard.TargetName="slow"
        		Storyboard.TargetProperty="Opacity" From="0.0"
        		To="0.6" Duration="0:0:1"/>
            <DoubleAnimation Storyboard.TargetName="fast"
        		Storyboard.TargetProperty="Opacity" From="0.0"
        		To="0.6" Duration="0:0:1"/>
        </Storyboard>

        <Storyboard x:Name="fadeout">
            <DoubleAnimation Storyboard.TargetName="slideControl"
        		Storyboard.TargetProperty="Opacity" From="1"
        		To="0.1" Duration="0:0:1"/>
            <DoubleAnimation Storyboard.TargetName="slow"
        		Storyboard.TargetProperty="Opacity" From="1"
        		To="0.1" Duration="0:0:1"/>
            <DoubleAnimation Storyboard.TargetName="fast"
        		Storyboard.TargetProperty="Opacity" From="1"
        		To="0.1" Duration="0:0:1"/>
        </Storyboard>

        <Storyboard x:Name="animateinfo">
            <DoubleAnimation Storyboard.TargetName="info"
        		Storyboard.TargetProperty="Opacity" From="0"
        		To="1" Duration="0:0:0.5" AutoReverse="True"/>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.FontFamily>
        <StaticResource ResourceKey="PhoneFontFamilyNormal"/>
    </UserControl.FontFamily>
    <UserControl.FontSize>
        <StaticResource ResourceKey="PhoneFontSizeNormal"/>
    </UserControl.FontSize>
    <UserControl.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush"/>
    </UserControl.Foreground>
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Slider x:Name="slideControl" Margin="1,-9,0,-1"
			ValueChanged="slideControl_ValueChanged" 
			Orientation="Vertical" Maximum="9" 
			FlowDirection="LeftToRight" 
			RenderTransformOrigin="0.48,0.493" 
			BorderThickness="0" SmallChange="0.1" 
			Opacity="0.01" 
			MouseLeave="slideControl_LostMouseCapture"
			MouseLeftButtonUp="slideControl_LostMouseCapture"
			MouseEnter="slideControl_MouseEnter" 
			LostMouseCapture="slideControl_LostMouseCapture" 
			Background="{StaticResource PhoneBackgroundBrush}" BorderBrush="Black">
            <Slider.RenderTransform>
                <CompositeTransform Rotation="-180" TranslateX="2" TranslateY="2.604" />
            </Slider.RenderTransform>
        </Slider>
        <TextBlock x:Name="slow" HorizontalAlignment="Stretch" Margin="10,-25,-10,180"  
                   Text="{Binding Path=LocalizedResources.AutoScroll_Slow, Source={StaticResource LocalizedStrings}}" Width="58" RenderTransformOrigin="1.396,0.333" FontSize="16" Opacity="0.01" >
            <TextBlock.Foreground>
                <SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
            </TextBlock.Foreground>
        </TextBlock>
        <TextBlock x:Name="fast" HorizontalAlignment="Stretch" Margin="13,172,-13,-14" 
                   Text="{Binding Path=LocalizedResources.AutoScroll_Fast, Source={StaticResource LocalizedStrings}}" 
                   VerticalAlignment="Top" Width="58" RenderTransformOrigin="1.396,0.333" FontSize="16" Opacity="0.01" Height="18" >
            <TextBlock.Foreground>
                <SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
            </TextBlock.Foreground>
        </TextBlock>
        <TextBlock x:Name="info" HorizontalAlignment="Center" Margin="-23,200,-18,-57" TextWrapping="Wrap" Text="info" VerticalAlignment="Top" Width="99" RenderTransformOrigin="1.396,0.333" FontSize="20" Opacity="0.00" Height="33" TextAlignment="Center" >
            <TextBlock.Foreground>
                <SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
            </TextBlock.Foreground>
        </TextBlock>


    </Grid>

</UserControl>
        